package clever

import (
	"fmt"
	"gitee.com/sdynasty/clever/sign/keys"
)



func (a *App) loadKeys() error {
	if a.opts.privateKey != "" && a.opts.publicKey != "" {
		var err error
		if err = keys.RegisterKeys(fmt.Sprintf("private_%d", a.opts.productId), []byte(a.opts.privateKey)); err != nil {
			return err
		}
		if err = keys.RegisterKeys(fmt.Sprintf("public_%d", a.opts.productId), []byte(a.opts.publicKey)); err != nil {
			return err
		}
	}
	return nil
}